package it.tukano.fun;

public class StartsWith implements Function1<Object, Boolean> {
    
    private final String prefix;

    public StartsWith(String prefix) {
        this.prefix = prefix;
    }

    public Boolean apply(Object p) {
        if(p == null) return false;
        return p.toString().startsWith(prefix);
    }
}
